<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Line_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-line_id" data-rule="required" data-source="line/index" data-field="line_name" class="form-control selectpage" name="row[line_id]" type="text" value="{$row.line_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Depart_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-depart_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm" data-use-current="true" name="row[depart_time]" type="text" value="{:$row.depart_time?datetime($row.depart_time):''}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('上车站点时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <table class="table fieldlist" data-template="basictpl" data-name="row[station_name_json]" data-tag="tr" id="first-table">
                <tr>
                    <td>{:__('上车站点')}</td>
                    <td>{:__('时间')}</td>
                </tr>
            </table>

            <!--请注意实际开发中textarea应该添加个hidden进行隐藏-->
            <textarea name="row[station_name_json]" id="c-station_name_json" class="form-control hidden" cols="30" rows="5">{$row.station_name_json}</textarea>
            <script id="basictpl" type="text/html">
                <tr class="form-inline">
                    <td><input type="text" name="<%=name%>[<%=index%>][station_name]" class="form-control" readonly value="<%=row.station_name%>" placeholder="站点"/></td>
                    <td><input type="text" name="<%=name%>[<%=index%>][station_time]" class="form-control" data-rule="required" value="<%=row.station_time%>" placeholder="时间"/></td>
                </tr>
            </script>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Driver_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-driver_id" data-rule="required" data-source="user/driver/index" data-field="driver_name" class="form-control selectpage" name="row[driver_id]" type="text" value="{$row.driver_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Banc_sn')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-banc_sn" data-rule="required" class="form-control" name="row[banc_sn]" type="text" value="{$row.banc_sn|htmlentities}">
        </div>
    </div>
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Distance')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-distance" class="form-control" step="0.1" name="row[distance]" type="number" value="{$row.distance|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Distance_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-distance_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[distance_time]" type="text" value="{:$row.distance_time?datetime($row.distance_time):''}">
        </div>
    </div> -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
        </div>
    </div>
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:$row.create_time?datetime($row.create_time):''}">
        </div>
    </div> -->
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
